package other;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 日期类型枚举类
 *
 * @author superC
 * @version 3.0.0
 * @date 2025-01-16
 */

public enum DateTypeEnum {

    DAY(1, "按天"),

    MONTH(2, "按月"),

    YEAR(3, "按年");

    private final Integer code;

    private final String name;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    DateTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static Map<Integer, String> getList() {
        Map<Integer, String> resultMap = new LinkedHashMap<>();
        resultMap.put(DateTypeEnum.DAY.getCode(), DateTypeEnum.DAY.getName());
        resultMap.put(DateTypeEnum.MONTH.getCode(), DateTypeEnum.MONTH.getName());
        resultMap.put(DateTypeEnum.YEAR.getCode(), DateTypeEnum.YEAR.getName());
        return resultMap;
    }

}
